home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / comm / hzcomm31.zip / FOSSIL.DOC < prev    next >
Text File  |  1987-03-07  |  20KB  |  546 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.                  Fundamentals of FOSSIL implementation and use
  14.                         Draft Version 3   March 7, 1987
  15.                       Vincent E. Perriello, VEP Software
  16.  
  17.  
  18.          IFNA Address: Network 141 Node 491 (141/491)
  19.      Usenet address: ...decvax!envore!vaxine!spark!141!491!Vince_Perriello
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  Copyright (C) 1987, VEP Software, Naugatuck, CT 06770. All rights reserved.
  50.  
  51.  This document may be freely used or copied by anyone interested in the data
  52.  contained herein. No fees may be charged for distribution of this document.
  53.  You will be held  accountable for all such charges,  and expected to either
  54.  reimburse those persons or organizations so charged,  or to make a donation
  55.  in the exact amount of those fees to the International FidoNet Association, 
  56.  to  assist  them in their  efforts to  advance the  technology of  personal 
  57.  computer telecommunications.
  58.  
  59. Fundamentals of FOSSIL implementation and use                         Page 1
  60.  
  61.  
  62.  
  63.  
  64.  A. Objectives of this document
  65.  
  66.     This document is directed at implementors or intellectuals.  It is meant
  67.     for use in implementing applications that can use FOSSIL drivers, or for
  68.     details needed to implement a new FOSSIL. As such it won't always go out
  69.     of its way to explain itself to the neophyte.
  70.  
  71.     This document will have served its purpose to you if you are able to use
  72.     the data contained within to perform either of the above tasks.   If you
  73.     feel that necessary data has been omitted please contact Vince Perriello
  74.     at the above listed address so that the appropriate changes can be made.
  75.  
  76.  
  77.  
  78.  B. Historical perspective
  79.  
  80.     For those people who were not lucky enough to have an IBM PC or a system
  81.     nearly completely compatible, the world has not been very friendly. With
  82.     his implementation of the Generic Fido(tm) driver,  Tom Jennings made it
  83.     possible for systems that had nothing in common with an IBM PC except an
  84.     808x-class processor, and the ability to run MS-DOS Version 2 and above,
  85.     to run his Fido(tm) software. That was a lot to ask, and a lot of people
  86.     thought it was enough.
  87.  
  88.     But not everyone.  While Thom Henderson was debugging Version 4.0 of his
  89.     SEAdog(tm) mail package,  an "extended" Generic driver was designed  (in
  90.     cooperation with Bob Hartman)   as a quick kludge to help him get past a
  91.     problem with certain UART chips.The new hook was quickly pounced upon by
  92.     Vince Perriello,  who, with almost DAILY prodding (ouch! it still hurts)
  93.     by Ken Kaplan,had been working with Henderson to get DEC Rainbow support
  94.     into SEAdog. Vince then coded a driver to use this hook and - Voila! - 
  95.     SEAdog 4.0 started working like a champ on the Rainbow.
  96.  
  97.     Then something WONDERFUL happened. Wynn Wagner started having a bad time
  98.     getting the Greenleaf(tm) Communication Libraries to work in exactly the
  99.     way he wanted them to. Enter Bob Hartman. Having already enjoyed success
  100.     in the effort with Thom Henderson, he suggested to Wynn that with a very
  101.     few extensions, the driver that SEAdog(tm) 4.0 liked could drive Opus as
  102.     well. Then Vince called Wynn, Wynn called Bob, Bob called Vince, and the
  103.     FOSSIL driver came into existence.
  104.  
  105.     FOSSIL, by the way, is an acronym that Vince dreamed up. It took a while
  106.     for everyone to stomach it,but it now seems to be loved by all. It is an
  107.     acronym for "Fido/Opus/SEAdog Standard Interface Layer". And the concept
  108.     is catching on.   Henk Wevers is reportedly coding a terminal program in
  109.     Turbo Pascal that uses FOSSIL services to do all the work.   This should
  110.     mean that the result will play elsewhere.   And there are already FOSSIL
  111.     implementations for the Tandy 2000, Sanyo 555, Z100 and others,   so the
  112.     potential of a properly coded FOSSIL application is very great.
  113.  
  114. Fundamentals of FOSSIL implementation and use                         Page 2
  115.  
  116.  
  117.  
  118.  
  119.  C. Basic principles of a FOSSIL driver
  120.  
  121.     1)  Interrupt 14H.
  122.  
  123.     The one basic rule that the driver depends upon,  is the ability for ANY
  124.     target machine to allow the vector for INT 14H (absolute locations 50 to
  125.     53 in segment 0) to be "stolen" by the driver. In a system where the INT
  126.     14H vector is used already, it must be possible to replace the "builtin"
  127.     functionality with that of a FOSSIL,  when an application that wants the
  128.     use of a FOSSIL is to be run on the target machine.
  129.  
  130.  
  131.     2)  How to install a FOSSIL driver in a system
  132.  
  133.     There's no hard and fast way to do this. The FOSSIL might be implemented
  134.     as part of a device driver (like Ray Gwinn's X00.SYS) and therefore gets
  135.     loaded using a line in CONFIG.SYS at bootup time.  It might be done as a
  136.     TSR (terminate and stay resident) program, in which event you install it
  137.     by running the program  (DECCOMM by Vince Perriello and Opus!Comm by Bob
  138.     Hartman work this way, for example).
  139.  
  140.  
  141.     3)  How an application can detect the presence of a FOSSIL
  142.  
  143.     The driver has a "signature" that can be used to determine whether it is 
  144.     present in memory. At offset 6 in the INT 14H service routine is a word, 
  145.     1954 hex,  followed by a byte that specifies the maximum function number 
  146.     supported by the driver. This is to make it possible to determine when a
  147.     driver is present and what level of functionality it provides. Also, the
  148.     Init call (see below) returns a 1954 Hex in AX.  SEAdog(tm) looks at the
  149.     signature and Opus just goes for the Init. Fido doesn't do either.
  150.  
  151.  
  152.     4)  How to call a FOSSIL function
  153.  
  154.     The FOSSIL driver is entered by issuing a software Interrupt 14 Hex from
  155.     the application  program. The code corresponding to the desired function 
  156.     should be in 8-bit register AH. For calls that relate to communications,
  157.     the port number will be passed from the application in register DX. When
  158.     DX contains a zero (0) it signifies use of COM1, or whatever the "first"
  159.     serial port on your machine is called. A one (1) in DX points the driver
  160.     at COM2, and so on.
  161.  
  162. Fundamentals of FOSSIL implementation and use                         Page 3
  163.  
  164.  
  165.  
  166.  
  167. D. Functions currently defined for FOSSILs
  168.  
  169.  
  170.  
  171.     AH = 0    Set baud rate 
  172.         Input:    AL = baud rate code
  173.             DX = port number
  174.  
  175.     This works the same as the  equivalent IBM PC BIOS call,  except that it
  176.     ONLY selects a baud rate.  This is passed in the high order 3 bits of AL
  177.     as follows:
  178.  
  179.         000 =  110 baud
  180.         001 =  150  ''
  181.         010 =  300  ''
  182.         011 =  600  ''
  183.         100 = 1200  ''
  184.         101 = 2400  ''
  185.         110 = 4800  ''
  186.         111 = 9600  ''
  187.  
  188.     The low order 3 bits can be implemented or not by the FOSSIL, but in all
  189.     cases, if the low order bits of AL are 00011,  the result should be that
  190.     the communications device should be set to eight data bits, one stop bit
  191.     and no parity. This setting is a  MINIMUM REQUIREMENT  of Fido, Opus and
  192.     SEAdog.
  193.  
  194.  
  195.  
  196.     AH = 1    Transmit character 
  197.         Input:    AL = character
  198.             DX = port number
  199.         Output: AX contains status bits (see function 3)
  200.  
  201.     AL contains the character to be sent.   If there is room in the transmit
  202.     buffer the return will be immediate,  otherwise it will wait until there
  203.     is room to store the character in the transmit buffer.  On return, AX is
  204.     set as in a status request (see function 3).
  205.  
  206.  
  207.  
  208.     AH = 2    Receive a character 
  209.         Input:    DX = port number
  210.         Output:    AL = input character
  211.  
  212.     If there is a character  available in the  receive buffer,  returns with 
  213.     the next character in AL.  It will wait until a character is received if
  214.     none is available.
  215.  
  216. Fundamentals of FOSSIL implementation and use                         Page 4
  217.  
  218.  
  219.  
  220.  
  221.     AH = 3    Request status
  222.         Input:    DX = port number
  223.         Output:    AX = status bit mask (see below)
  224.  
  225.     Returns with the line and modem status in AX.  Status bits returned are:
  226.  
  227.         In AH:
  228.         Bit 0 =    RDA  - input data is available in buffer
  229.         Bit 5 = THRE - room is available in output buffer
  230.         Bit 6 = TSRE - output bu